package com.flower.mapper;

import com.flower.model.entity.Adminlogin;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author lm
 * @create 2022-03-17 16:12
 */
@Mapper
public interface AdminloginMapper  {
    @Insert("insert into fl_login(adname,create_Time) values(#{adname},now())")
    void add(Adminlogin adminlogin);
    @Update("update fl_login set adname=#{adname},create_Time=#{createTime} where id=#{id}")
    void update(Adminlogin adminlogin);
    @Select("select * from fl_login order by create_Time desc ")
    List<Adminlogin> listAdminLogin();
    @Select("select * from fl_login order by create_Time desc")
    Page<Adminlogin> pageQuery();
}